#include "communication/Usart_rt1064.h"

void Usart_RT1064::UsartTransmitFloat()
{
    //HAL_UART_Transmit_DMA(huart,tx_buff,getAllLen());
}

void Usart_RT1064::SendData(float* data,uint8_t len)
{
    SetFloatData(data,len);
    MergeData();
    //UsartTransmitFloat();
	SendCommonData(getResult(),getAllLen());
}

void Usart_RT1064::SendCommonData(uint8_t* data,uint16_t len)
{
		if(len <= TX_MAX)
		{
			memcpy(tx_buffer,data,len);
			tx_trans->dataSize = len;
			LPUART_TransferSendNonBlocking(base,handle,tx_trans);
		}	
	
}
